<%@page import="java.util.ArrayList"%>
<%@page import="lib_model.Orther.ReturnObj"%>
<%@page import="lib_model.Product.Tax_product"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<jsp:include page="../templates/Admin.jsp"></jsp:include>
Manager - Tax
<jsp:include page="../templates/Title.jsp"></jsp:include>
<script type="text/javascript">
	$(document).ready(function() {
		$("#createfac").hide();
		$("#btcreate").click(function() {
			$("#createfac").fadeIn();
		});
	});
</script>
<jsp:include page="../templates/StyleAd.jsp"></jsp:include>
<div class="body-center w960">
<h2 class="title-show">Categories</h2>
<table class="tb">

	<thead>
		<tr>
			<th align="left" width="20%">Tax ID</th>
			<th align="left" width="20%">Value</th>
			<th align="left" width="20%">Type</th>
			<th align="left" width="20%">Date Create</th>
		</tr>
	</thead>
	<%
		Tax_product taxs = new Tax_product();
		ReturnObj rs = taxs.Select();
		ArrayList<Tax_product> arr = (ArrayList<Tax_product>) rs.ObjResult;
	%>
	<tbody>
		<%
			for (Tax_product tax : arr) {
		%>
		<tr>
			<td><b><%=tax.id%></b></td>
			<td><b><%=tax.value%></b></td>
			<%
				if (tax.type == 1) {
			%>
			<td><img src="../contents/icon/svn_normal.png" /></td>
			<%
				} else {
			%>
			<td><img src="../contents/icon/svn_modified.png" /></td>
			<%
				}
			%>
			<td><%=tax.date_create%></td>
		</tr>
		<%
			}
		%>
	</tbody>
</table>
<input type="button" id="btcreate" value="Create Tax Product" /> <%
 	if (request.getAttribute("Mes") != null) {
 %> <br />
<h2><%=request.getAttribute("Mes")%></h2>
<%
	}
%>
<form action="../product/AddTax" method="post">
<table class="tb" style="width: 300px;" id="createfac">
	<thead>
		<tr>
			<th align="left" width="20%"></th>
			<th align="left" width="20%"></th>
		</tr>
		<tr>
			<td>Tax Value</td>
			<td><input type="text" name="txtValue"></td>
		</tr>
		<tr>
			<td>Tax Type</td>
			<td><select name="txtType">
				<Option value="1">Active</Option>
				<Option value="0">Deactive</Option>
			</select></td>
		</tr>
		<tr align="center">
			<td colspan="2"><input type="submit" value="Add"></td>
		</tr>
	</thead>

</table>
</form>
</div>
<jsp:include page="../templates/Footer.jsp"></jsp:include>